﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="SurchargeNames.aspx.cs" Inherits="IFD2.SurchargeNames" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <form id="form1" runat="server" role="form" class="form-inline" defaultbutton="lbtnQuery">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate>
        <div class="container-fluid body-content" style="width:100%;">
            <div class="row">
                <div class="col-sm-2 well well-sm">
                    <h5><asp:Literal ID="litTitle" runat="server" meta:resourcekey="tipPageTitle"></asp:Literal></h5>
                    <div class="form-group">
                        <asp:Label ID="Label21" runat="server" Text="Airline:" meta:resourcekey="Airline"></asp:Label>
                        <asp:Label ID="lblAirline" runat="server" Text=""></asp:Label><br />
                        <asp:Label ID="Label1" runat="server" Text="Surcharge Code:" meta:resourcekey="SurchargeCode"></asp:Label>
                        <asp:Label ID="lblSurchargeCode" runat="server" Text=""></asp:Label>
                    </div>
                    <br class="hidden-xs"/><br class="hidden-xs"/>
                    <asp:LinkButton ID="lbtnQuery" runat="server" CssClass="form-control input-sm btn-primary text-center" Width="100%" ToolTip="" meta:resourcekey="tipQuery" OnClick="lbtnQuery_Click"> <span class="glyphicon glyphicon-search" style="font-size:large;"></span></asp:LinkButton>
                    <p></p><%--没有此行(或&nbsp;)，上面的按钮在手机模式(xs)下，只有上半部可以点击！--%>
                    <asp:Label ID="lblError" runat="server" CssClass="ifdMessage"></asp:Label>
                </div>

                <div class="col-sm-10 well well-sm">
                    <div class="panel">
                        <div class="panel-heading btn-primary">
                            <h6 class="panel-title" id="section-2"><asp:Literal ID="Literal1" runat="server" meta:resourcekey="tipPageTitle"></asp:Literal></h6>
                        </div>
                        <div class="panel-body">
                            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>" SelectCommand="bll_surcharge_get_names" SelectCommandType="StoredProcedure">
                                <SelectParameters>
                                    <asp:SessionParameter Name="airline" SessionField="AIRLINE" Type="String" />
                                    <asp:ControlParameter ControlID="lblSurchargeCode" Name="surcharge_code" PropertyName="Text" Type="String" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                            <div class="table-responsive">
                                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="airline,code,lang" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" class="table-hover" style="min-width:800px;width:100%;">
                                    <AlternatingRowStyle BackColor="White" />
                                    <Columns>
                                        <asp:TemplateField>
                                            <ItemTemplate>
                                            <input name="KEY" type="radio" value='<%# Eval("lang") %>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:BoundField DataField="language" HeaderText="language" ReadOnly="True" SortExpression="language" meta:resourcekey="language1" />
                                        <asp:BoundField DataField="name" HeaderText="name" SortExpression="name" meta:resourcekey="name1" />
                                        <asp:BoundField DataField="done_user" HeaderText="done_user" SortExpression="done_user" meta:resourcekey="done_user" />
                                        <asp:BoundField DataField="done_time" HeaderText="done_time" SortExpression="done_time" meta:resourcekey="done_time" />
                                    </Columns>
                                    <EditRowStyle BackColor="#2461BF" />
                                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                    <RowStyle BackColor="#EFF3FB" />
                                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
                                </asp:GridView>
                            </div>

                            <div class="btn-group">
                                <asp:Button ID="btnDelete" runat="server" CssClass="btn btn-sm btn-default" Text="Delete" OnClick="btnDelete_Click" meta:resourcekey="Delete" /><br />
                            </div>

                            <div class="well well-sm">
                                <div class="form-group">
                                    <asp:Label ID="Label2" runat="server" Text="Language:" meta:resourcekey="Language"></asp:Label>
                                    <asp:DropDownList ID="lstLang" runat="server" DataSourceID="SqlDataSource2" DataTextField="name" DataValueField="code"></asp:DropDownList>
                                    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>" SelectCommand="bll_lang_get_codes" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                                </div>
                                <div class="form-group">
                                    <asp:Label ID="Label3" runat="server" Text="Name:" meta:resourcekey="Name"></asp:Label>
                                    <asp:TextBox ID="txtName" runat="server" MaxLength="30" Width="500px"></asp:TextBox>
                                </div>
                                <asp:Button ID="btnAdd" runat="server" Text="Add" CssClass="btn btn-sm btn-default"  meta:resourcekey="Add" OnClick="btnAdd_Click" />
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </ContentTemplate></asp:UpdatePanel>
    </form>
</asp:Content>

